package com.easy.service.impl;

import com.easy.bean.Reservations;
import com.easy.dao.IReservationsDao;
import com.easy.service.IReservations;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ReservationsImpl implements IReservations {
    @Autowired
    IReservationsDao dao;

    public Reservations getReservations(int id){
        return dao.getReservations(id);
    }

    @Override
    public int addReservations(Reservations reservations) {
       int count= dao.addReservations(reservations);
        return count;
    }

    //删除
    @Override
    public int delReservations(int id){
        int count=dao.delReservations(id);
        return count;
    }

    //修改
    public int editReservations(Reservations reservations){
        int count=dao.editReservations(reservations);
        return count;
    }

    @Override
    public int editReservations_room(Reservations reservations) {
        int count=dao.editReservations_room(reservations);
        return count;
    }

    @Override
    public List<Reservations> getSearchEmployess(Reservations reservations, Page page) {
        return dao.getSearchReservations(reservations,page);
    }


    public int getCount(Reservations reservations){
        return dao.getCount(reservations);
    }

}
